libxc/xc_sr_save.c: initialise rec.data before free()
authorJoshua Otto <jtotto@uwaterloo.ca>
Mon, 27 Mar 2017 09:06:22 +0000 (05:06 -0400)
committerWei Liu <wei.liu2@citrix.com>
Wed, 29 Mar 2017 17:27:49 +0000 (18:27 +0100)
commit5c53c93998e370ab3da0b3d1d12e6bc760224d67
tree074f21d03f59dec55a72eea15050cf6d259e9295
parentb53b4037cef6d15c3d29396648d893872fd9d910
libxc/xc_sr_save.c: initialise rec.data before free()

colo_merge_secondary_dirty_bitmap() unconditionally free()s the .data
member of its local xc_sr_record structure rec on its exit path.
However, if the initial call to read_record() fails then this member is
uninitialised.  Initialise it.

Signed-off-by: Joshua Otto <jtotto@uwaterloo.ca>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_sr_save.c